package com.vineetmanohar.nitrogen;

public class ModelUtils {
	/**
	 * The depth of this element in the model tree. Top-level depth is 1.
	 * 
	 * @param model
	 * @return
	 */
	public static int getDepth(Model model) {
		if (model.getParent() == null) {
			return 1;
		}

		return getDepth(model.getParent()) + 1;
	}
}